import { Component, Suspense } from 'react'
import {
    BrowserRouter,
    HashRouter,
    Routes,
    Route,
    NavLink,
} from 'react-router-dom'
import csss from '../css/index.module.css'
import 'antd/dist/antd.css'
import routers from '../router/index'
import Login from '../views/login'
class Indexc extends Component {
    constructor() {
        super()
        this.state = {

        }
    }
    render() {
        return (
            <HashRouter>
                <div className={csss.container}>
                    <div className={csss.wrapper}>
                        <Suspense fallback={<div style={{ color: "red", fontSize: "100px" }}></div>}>
                            <Routes>
                                {
                                    routers.map((e, i) => {
                                        return <Route path={e.path} element={e.element} key={i}></Route>
                                    })
                                }
                            </Routes>
                        </Suspense>
                    </div>
                </div>
            </HashRouter>

        )
    }
}

export default Indexc